#ifndef DSPSIMULATOR_INSTRUCTION_EXECUTE_H
#define DSPSIMULATOR_INSTRUCTION_EXECUTE_H

#include "dspSimulator/targetMachine/dspMachine.h"

namespace c_simulator {
    static void mvkl_imm_dst(i16 imm, u32 &dst) {
        u32 dst_hi = dst & 0xffff0000;
        u32 imm_zero_ext = static_cast<u32>(imm);
        dst = dst_hi | imm_zero_ext;
    }

    static void mvkh_imm_dst(i16 imm, u32 &dst) {
        u32 dst_lo = dst & 0x0000ffff;
        u32 imm_zero_ext = static_cast<u32>(imm);
        u32 imm_hi = imm_zero_ext << 16;
        dst = dst_lo | imm_hi;
    }

    static void mvk_imm_dst(i16 imm,u32 &dst){
        u32 imm_signed_ext = static_cast<i32>(imm);
        dst = imm;
    }
}

#endif //DSPSIMULATOR_INSTRUCTION_EXECUTE_H
